package com.vcit.system.service.clazzGroup.impl;

import java.util.List;

import com.vcit.common.utils.DateUtils;
import com.vcit.common.utils.SecurityUtils;
import com.vcit.system.mapper.clazzGroup.TClazzGroupMapper;
import com.vcit.system.service.clazzGroup.ITClazzGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.vcit.system.domain.clazzGroup.TClazzGroup;


/**
 * 班级群Service业务层处理
 * 
 * @author dff
 * @date 2025-01-09
 */
@Service
public class TClazzGroupServiceImpl implements ITClazzGroupService
{
    @Autowired
    private TClazzGroupMapper tClazzGroupMapper;

    /**
     * 查询班级群
     * 
     * @param id 班级群主键
     * @return 班级群
     */
    @Override
    public TClazzGroup selectTClazzGroupById(Long id)
    {
        return tClazzGroupMapper.selectTClazzGroupById(id);
    }

    /**
     * 查询班级群列表
     * 
     * @param tClazzGroup 班级群
     * @return 班级群
     */
    @Override
    public List<TClazzGroup> selectTClazzGroupList(TClazzGroup tClazzGroup)
    {
        return tClazzGroupMapper.selectTClazzGroupList(tClazzGroup);
    }

    /**
     * 新增班级群
     * 
     * @param tClazzGroup 班级群
     * @return 结果
     */
    @Override
    public int insertTClazzGroup(TClazzGroup tClazzGroup)
    {
        tClazzGroup.setCreateTime(DateUtils.getNowDate());
        tClazzGroup.setCreateBy(SecurityUtils.getUsername());
        return tClazzGroupMapper.insertTClazzGroup(tClazzGroup);
    }

    /**
     * 修改班级群
     * 
     * @param tClazzGroup 班级群
     * @return 结果
     */
    @Override
    public int updateTClazzGroup(TClazzGroup tClazzGroup)
    {
        tClazzGroup.setUpdateTime(DateUtils.getNowDate());
        tClazzGroup.setUpdateBy(SecurityUtils.getUsername());
        return tClazzGroupMapper.updateTClazzGroup(tClazzGroup);
    }

    /**
     * 批量删除班级群
     * 
     * @param ids 需要删除的班级群主键
     * @return 结果
     */
    @Override
    public int deleteTClazzGroupByIds(Long[] ids)
    {
        return tClazzGroupMapper.deleteTClazzGroupByIds(ids);
    }

    /**
     * 删除班级群信息
     * 
     * @param id 班级群主键
     * @return 结果
     */
    @Override
    public int deleteTClazzGroupById(Long id)
    {
        return tClazzGroupMapper.deleteTClazzGroupById(id);
    }
}
